import Mock from "mockjs";
//处理路径传参
import { parameteUrl } from "@/utils/query-param";
import { RandomNumBoth, generateRandomArray, ArrSet } from "./index";

export default [
    {
        url: "/shop/bottomTableData",
        type: "get",
        response: () => {
            const arr = generateRandomArray(10).sort(function (a, b) {
                return b - a;
            });
            const response = Mock.mock({
                success: true,
                data: {
                    "list|5": [
                        {
                            shopName: "@csentence(4,5)",
                            "categoryName|1": ["化妆品", "服装", "生活用品", "零食", "美妆用品", "儿童用品"],
                        },
                    ],
                },
            });
            response.data.list.forEach((element: any, index: number) => {
                element.percentage = arr[index];
            });
            return response;
        },
    },
];
